CC=/usr/local/bin/arm-apple-darwin-gcc -O2 -std=gnu99
CXX=/usr/local/bin/arm-apple-darwin-g++

LD=$(CC)
LDFLAGS = \
		-framework CoreFoundation \
		-framework Foundation \
		-framework UIKit \
		-framework LayerKit \
		-framework CoreGraphics \
		-framework GraphicsServices \
		-framework CoreSurface \
		-framework AudioToolbox \
		-lobjc

TARGET=TouchMouse
OBJECTS=main.o Application.o PreferencesView.o MouseView.o

all:	$(TARGET)

$(TARGET):	$(OBJECTS)
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
		rm -f *.o $(TARGET)
